﻿<Window x:Class="MOCSoftware.Utilities.PortInspector.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:View="clr-namespace:MOCSoftware.Utilities.PortInspector.View"
        xmlns:Properties="clr-namespace:MOCSoftware.Utilities.PortInspector.Properties"
        Cursor="{Binding Path=FormCursor}"
        Style="{DynamicResource Main}"
        Title="{x:Static Properties:Resources.About_Title}"
        >
    <Window.Resources>
        <ResourceDictionary Source="ApplicationResources.xaml" />
    </Window.Resources>
    <DockPanel Cursor="{Binding Path=FormCursor}">
        <ContentControl IsEnabled="{Binding Path=FormIsEnabled}" DockPanel.Dock="Top" Name="ctcMainMenu" Content="{Binding Path=MainMenu}" />
<!--        <Menu DockPanel.Dock="Top" Name="mnuMain" KeyboardNavigation.TabNavigation="Cycle" IsEnabled="{Binding Path=FormIsEnabled}">
            <MenuItem Header="_File">
                <MenuItem Header="Load _Port List" Command="{Binding Path=LoadPortListCommand}"  />
                <MenuItem Header="Save P_ort List" Command="{Binding Path=SavePortListCommand}" />
                <Separator />
                <MenuItem Header="E_xit" InputGestureText="ALT + F4" Command="{Binding Path=CloseCommand}" />
            </MenuItem>
            <MenuItem Header="_Port">
                <MenuItem Header="_Add" InputGestureText="CTL + P" Command="{Binding Path=AddPortCommand}" />
                <MenuItem Header="_Edit" Command="{Binding Path=EditPortCommand}" Style="{StaticResource disablePortMenuItem}" />
                <MenuItem Header="_Delete" Command="{Binding Path=DeletePortCommand}" Style="{StaticResource disablePortMenuItem}" />
                <MenuItem Header="_Clear Port List" Command="{Binding Path=ClearPortListCommand}" />
                <MenuItem Header="_Reload Ports From Services File" Command="{Binding Path=ReloadPortListFromServicesFileCommand}" />
            </MenuItem>
        </Menu> -->
        <StatusBar DockPanel.Dock="Bottom">
            <TextBlock Text="{Binding Path=StatusMessage}" Name="sbFeedback" />
            <ProgressBar Name="pgbLoadServices" Visibility="{Binding Path=ProgressBarVisibility}" Maximum="{Binding Path=ProgressBarMaximum}" Minimum="{Binding Path=ProgressBarMinimum}" Value="{Binding Path=ProgressBarCurrent,Mode=OneWay}" Width="250" Height="20" HorizontalAlignment="Right" />
        </StatusBar>
        <Grid HorizontalAlignment="Stretch">
            <Grid IsEnabled="{Binding Path=FormIsEnabled}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="205"/>
                    <ColumnDefinition Width="205" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                </Grid.RowDefinitions>
                <ContentControl Grid.Column="0" Grid.Row="0" Name="ctcPortDetail" Content="{Binding Path=PortDetail}" />
                <ContentControl Grid.Column="1" Grid.Row="0" Name="ctcHostDetail" Content="{Binding Path=HostDetail}" />
                <ContentControl Grid.Column="2" Grid.Row="0" Name="ctcScannerResults" Content="{Binding Path=ScannerResults}" />
            </Grid>
            <View:PortAddView DataContext="{Binding PortAddWindow}" Visibility="{Binding Path=IsVisible,Converter={StaticResource BoolToVisibility}}" />
            <View:AddHostListView DataContext="{Binding AddHostListWindow}" Visibility="{Binding Path=IsVisible,Converter={StaticResource BoolToVisibility}}" />
            <View:ModalMessageDialogView DataContext="{Binding MessageDialog}" Visibility="{Binding Path=IsVisible,Converter={StaticResource BoolToVisibility}}" />
            <View:AboutView DataContext="{Binding AboutViewModel}" Visibility="{Binding Path=IsVisible,Converter={StaticResource BoolToVisibility}}" />
        </Grid>
    </DockPanel>
</Window>
